Move down each line in units of text_height rather than in units of
authorCody Russell <bratsche@gnome.org>
Mon, 31 Mar 2008 21:45:22 +0000 (21:45 +0000)
committerCody Russell <bratsche@src.gnome.org>
Mon, 31 Mar 2008 21:45:22 +0000 (21:45 +0000)
2008-03-31  Cody Russell  <bratsche@gnome.org>

        * demos/gtk-demo/printing.c (draw_page): Move down each line in
        units of text_height rather than in units of data->font_size.
        (totally awesome catch by Dom Lachowicz)

svn path=/trunk/; revision=19952

ChangeLog
demos/gtk-demo/printing.c

index f5c7b5ad4e75c39cef4bf8db301d9109f044765a..d1be7e85f4f06796f6ddcf4cac9e451d077e98b7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-31  Cody Russell  <bratsche@gnome.org>
+
+        * demos/gtk-demo/printing.c (draw_page): Move down each line in         
+        units of text_height rather than in units of data->font_size.
+        (totally awesome catch by Dom Lachowicz)
+
 2008-03-28  Richard Hult  <richard@imendio.com>
 
        * gdk/quartz/gdkevents-quartz.c: (gdk_event_translate),
index be1e066ca83b90c5e9ed6746b74d8ffffa046655..efa5838215474d02364675c506a0293067957ea9 100644 (file)
@@ -49,6 +49,7 @@ begin_print (GtkPrintOperation *operation,
   
   data->num_lines = i;
   data->num_pages = (data->num_lines - 1) / data->lines_per_page + 1;
+
   gtk_print_operation_set_n_pages (operation, data->num_pages);
 }
 
@@ -122,7 +123,7 @@ draw_page (GtkPrintOperation *operation,
     {
       pango_layout_set_text (layout, data->lines[line], -1);
       pango_cairo_show_layout (cr, layout);
-      cairo_rel_move_to (cr, 0, data->font_size);
+      cairo_rel_move_to (cr, 0, text_height);
       line++;
     }